At 16:23 +0300 on 26/08/1999, Paulo Roberto Kappke wrote:
> "UPDATE tasktime SET elapsed_time='age((SELECT inserted_time FROM
> tasktime WHERE row=$row),(SELECT inserted_time FROM tasktime WHERE
> row=$old_row))' WHERE row=$old_row"
If I'm not mistaken, Postgres does not allow subselects to be used in this
context. In any case the age function should not be in quotes...
Instead, the syntax Postgres uses from the days of old would be something like
UPDATE tasktime
SET elapsed_time = age( tt.inserted_time, inserted_time )
FROM tasktime tt
WHERE row=$old_row AND tt.row = $row;
This has nothing to do with timespan.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma